package com.swt.service.impl.W_impl;

import com.swt.dao.impl.W_impl.UserDaoImpl;
import com.swt.domain.User;
import com.swt.service.W_service.UserService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
public class UserServiceImpl implements UserService {
    @Resource
    private UserDaoImpl userDao;

    /**
     * 校验用户登录
     * */
    @Override
    public User checkLogin(User user) {
        return userDao.checkLogin(user);
    }

    /**
     * 用户注册
     * */
    @Override
    @Transactional
    public void register(User user) {
        userDao.register(user);
    }
}
